<div class="container">
  <form class="form-horizontal" (ngSubmit)="onSubmit()" #userForm="ngForm">
    <fieldset>
      <div id="legend" class="">
        <legend class="">userInfo</legend>
      </div>

      <div class="control-group">

        <!-- Text input-->
        <label class="control-label">username</label>
        <div class="controls">
          <input type="text" [(ngModel)]="user.username" required
                 id="username" name="username" class="input-xlarge form-control" #username="ngModel">
          <div [hidden]="username.valid || username.pristine" class="alert alert-danger">name is required</div>
          <p class="help-block"></p>
        </div>
      </div>
      <div class="control-group">
        <!-- Text input-->
        <label class="control-label">email</label>
        <div class="controls">
          <input type="text" placeholder="email" id="email" name="email" class="input-xlarge form-control">
          <p class="help-block"></p>
        </div>
      </div>
      <div class="control-group">
        <!-- Text input-->
        <label class="control-label">password</label>
        <div class="controls">
          <input type="text" placeholder="password" id="password" name="password" class="input-xlarge form-control">
          <p class="help-block">the length should be more than 8 digits.</p>
        </div>
      </div>
      <div class="control-group">

        <!-- Text input-->
        <label class="control-label">phone</label>
        <div class="controls">
          <input type="text" placeholder="phone" id="phone" name="phone" class="input-xlarge form-control">
          <p class="help-block"></p>
        </div>
      </div>
      <div class="control-group">
        <!-- Select Basic -->
        <label class="control-label">privilege</label>
        <div class="controls">
          <select class="input-xlarge form-control" id="privilege" name="privilege">
            <option *ngFor="let privi of privilege" [value]="privi">{{privi}}</option>
          </select>
        </div>

      </div>
      <br>
      <button type="submit" class="btn btn-primary input-xlarge form-control">Submit</button>


    </fieldset>
  </form>
</div>

